package com.example.demo.controller;

import com.example.demo.dto.Carousel;
import com.example.demo.service.CarouselService;
import com.example.demo.service.impl.CarouselServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/app/carousel")
public class CarouselController {
    private final CarouselService carouselService;

    @Autowired
    public CarouselController(CarouselServiceImpl carouselServiceImpl) {
        this.carouselService = carouselServiceImpl;
    }

    @GetMapping("/get/all_carousel")
    public List<Carousel> getAllCarousel() {
        return carouselService.getAllCarousel();
    }
}
